package org.dam.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author dam
 * @create 2024/1/7 21:23
 */
@Controller
public class EncodeController {

    @PostMapping("/t")
    public String test(Model model, String name){
        // 获取表单提交的值
        model.addAttribute("name",name);
        // 跳转到test页面显示输入的值
        return "test";
    }

}
